package Event;

import java.awt.Color;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;

public abstract class Calendar extends JFrame {

	JPanel calendarPanel;
	JPanel DayPanel;
	protected JButton btnmonkey1, btnbear1, btnlion1, btnseal1, btnele1,
			btnmonkey2, btnbear2, btnlion2, btnseal2, btnele2;
	protected static JButton homebtn;

	public Calendar() {

		calendarPanel = new JPanel() {
			public void paintComponent(Graphics g) {
				Image image = new ImageIcon("src/source/image/calendar.png")
						.getImage();
				g.drawImage(image, 0, 0, this);
			}
		};
		setContentPane(calendarPanel);
		DayPanel = new JPanel();
		setSize(975, 770);
		calendarPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		calendarPanel.setLayout(null);
		DayPanel.setBorder(new LineBorder(Color.GRAY, 1, true));
		DayPanel.setBounds(0, 118, 944, 426);
		calendarPanel.add(DayPanel);
		DayPanel.setLayout(new GridLayout(5, 7));
		makeWeek();
		makeDay();
	}

	public void makeWeek() {
		JPanel WeekPanel = new JPanel();
		WeekPanel.setBackground(new Color(153, 153, 153));
		WeekPanel.setBorder(new LineBorder(new Color(102, 102, 102), 1, true));
		WeekPanel.setBounds(0, 80, 944, 38);
		calendarPanel.add(WeekPanel);
		WeekPanel.setLayout(new GridLayout(1, 7, 0, 0));

		JPanel MonPanel = new JPanel();
		MonPanel.setBackground(new Color(153, 153, 153));
		MonPanel.setBorder(new LineBorder(new Color(204, 204, 204)));
		WeekPanel.add(MonPanel);

		JLabel lblMon = new JLabel("Mon");
		lblMon.setForeground(new Color(51, 51, 153));
		lblMon.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 20));
		MonPanel.add(lblMon);

		JPanel TuesPanel = new JPanel();
		TuesPanel.setBackground(new Color(153, 153, 153));
		TuesPanel.setBorder(new LineBorder(new Color(204, 204, 204)));
		WeekPanel.add(TuesPanel);

		JLabel lblTues = new JLabel("Tue");
		lblTues.setForeground(new Color(51, 51, 153));
		lblTues.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 20));
		TuesPanel.add(lblTues);

		JPanel WenPanel = new JPanel();
		WenPanel.setBackground(new Color(153, 153, 153));
		WenPanel.setBorder(new LineBorder(new Color(204, 204, 204)));
		WeekPanel.add(WenPanel);

		JLabel lblNewLabel = new JLabel("Wed");
		lblNewLabel
				.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 20));
		lblNewLabel.setForeground(new Color(51, 51, 153));
		WenPanel.add(lblNewLabel);

		JPanel ThurPanel = new JPanel();
		ThurPanel.setBackground(new Color(153, 153, 153));
		ThurPanel.setBorder(new LineBorder(new Color(204, 204, 204)));
		WeekPanel.add(ThurPanel);

		JLabel lblThur = new JLabel("Thu");
		lblThur.setForeground(new Color(51, 51, 153));
		lblThur.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 20));
		ThurPanel.add(lblThur);

		JPanel FriPanel = new JPanel();
		FriPanel.setBackground(new Color(153, 153, 153));
		FriPanel.setBorder(new LineBorder(new Color(204, 204, 204)));
		WeekPanel.add(FriPanel);

		JLabel lblFri = new JLabel("Fri");
		lblFri.setForeground(new Color(51, 51, 153));
		lblFri.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 20));
		FriPanel.add(lblFri);

		JPanel SatPanel = new JPanel();
		SatPanel.setBackground(new Color(153, 153, 153));
		SatPanel.setBorder(new LineBorder(new Color(204, 204, 204)));
		WeekPanel.add(SatPanel);

		JLabel lblSat = new JLabel("Sat");
		lblSat.setForeground(new Color(51, 51, 153));
		lblSat.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 20));
		SatPanel.add(lblSat);

		JPanel SunPanel = new JPanel();
		SunPanel.setBackground(new Color(153, 153, 153));
		SunPanel.setBorder(new LineBorder(new Color(204, 204, 204)));
		WeekPanel.add(SunPanel);

		JLabel lblSun = new JLabel("Sun");
		lblSun.setForeground(new Color(51, 51, 153));
		lblSun.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 20));
		SunPanel.add(lblSun);
	}

	public void makeDay() {

		JPanel day1 = new JPanel();
		day1.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day1);
		day1.setLayout(null);

		JLabel DLab1 = new JLabel("  1");
		DLab1.setForeground(new Color(0, 0, 102));
		DLab1.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab1.setBounds(0, 0, 23, 23);
		day1.add(DLab1);

		JPanel day2 = new JPanel();
		day2.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day2);
		day2.setLayout(null);

		JLabel DLab2 = new JLabel("  2");
		DLab2.setForeground(new Color(0, 0, 102));
		DLab2.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab2.setBounds(0, 0, 23, 23);
		day2.add(DLab2);

		JPanel day3 = new JPanel();
		day3.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day3);
		day3.setLayout(null);

		JLabel DLab3 = new JLabel("  3");
		DLab3.setForeground(new Color(0, 0, 102));
		DLab3.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab3.setBounds(0, 0, 23, 23);
		day3.add(DLab3);

		JPanel day4 = new JPanel();
		day4.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day4);
		day4.setLayout(null);

		JLabel DLab4 = new JLabel("  4");
		DLab4.setForeground(new Color(0, 0, 102));
		DLab4.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab4.setBounds(0, 0, 23, 23);
		day4.add(DLab4);

		JPanel day5 = new JPanel();
		day5.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day5);
		day5.setLayout(null);

		JLabel DLab5 = new JLabel("  5");
		DLab5.setForeground(new Color(0, 0, 102));
		DLab5.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab5.setBounds(0, 0, 23, 23);
		day5.add(DLab5);

		JPanel day6 = new JPanel();
		day6.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day6);
		day6.setLayout(null);

		JLabel DLab6 = new JLabel("  6");
		DLab6.setForeground(new Color(0, 0, 102));
		DLab6.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab6.setBounds(0, 0, 23, 23);
		day6.add(DLab6);

		btnmonkey1 = new JButton("");
		btnmonkey1.setIcon(new ImageIcon("src/source/image/monkey.png"));
		btnmonkey1.setBounds(35, 10, 69, 64);
		day6.add(btnmonkey1);

		JPanel day7 = new JPanel();
		day7.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day7);
		day7.setLayout(null);

		JLabel DLab7 = new JLabel("  7");
		DLab7.setForeground(new Color(0, 0, 102));
		DLab7.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab7.setBounds(0, 0, 23, 23);
		day7.add(DLab7);

		btnele1 = new JButton("");
		btnele1.setIcon(new ImageIcon("src/source/image/elephant.png"));
		btnele1.setBounds(35, 10, 69, 64);
		day7.add(btnele1);

		JPanel day8 = new JPanel();
		day8.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day8);
		day8.setLayout(null);

		JLabel DLab8 = new JLabel("  8");
		DLab8.setForeground(new Color(0, 0, 102));
		DLab8.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab8.setBounds(0, 0, 23, 23);
		day8.add(DLab8);

		btnbear1 = new JButton("");
		btnbear1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});

		btnbear1.setIcon(new ImageIcon("src/source/image/bear.png"));
		btnbear1.setBorderPainted(false);
		btnbear1.setBounds(35, 10, 64, 64);
		day8.add(btnbear1);

		JPanel day9 = new JPanel();
		day9.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day9);
		day9.setLayout(null);

		JLabel DLab9 = new JLabel("  9");
		DLab9.setForeground(new Color(0, 0, 102));
		DLab9.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab9.setBounds(0, 0, 23, 23);
		day9.add(DLab9);

		JPanel day10 = new JPanel();
		day10.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day10);
		day10.setLayout(null);

		JLabel DLab10 = new JLabel(" 10");
		DLab10.setForeground(new Color(0, 0, 102));
		DLab10.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab10.setBounds(0, 0, 23, 23);
		day10.add(DLab10);

		btnlion1 = new JButton("");
		btnlion1.setIcon(new ImageIcon("src/source/image/lion.png"));
		btnlion1.setBorderPainted(false);
		btnlion1.setBounds(35, 10, 64, 64);
		day10.add(btnlion1);

		JPanel day11 = new JPanel();
		day11.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day11);
		day11.setLayout(null);

		JLabel DLab11 = new JLabel(" 11");
		DLab11.setForeground(new Color(0, 0, 102));
		DLab11.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab11.setBounds(0, 0, 23, 23);
		day11.add(DLab11);

		JPanel day12 = new JPanel();
		day12.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day12);
		day12.setLayout(null);

		JLabel DLab12 = new JLabel(" 12");
		DLab12.setForeground(new Color(0, 0, 102));
		DLab12.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab12.setBounds(0, 0, 23, 23);
		day12.add(DLab12);

		btnseal1 = new JButton("");

		btnseal1.setIcon(new ImageIcon("src/source/image/ball.png"));
		btnseal1.setBounds(35, 10, 64, 64);
		day12.add(btnseal1);

		JPanel day13 = new JPanel();
		day13.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day13);
		day13.setLayout(null);

		JLabel DLab13 = new JLabel(" 13");
		DLab13.setForeground(new Color(0, 0, 102));
		DLab13.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab13.setBounds(0, 0, 23, 23);
		day13.add(DLab13);

		JPanel day14 = new JPanel();
		day14.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day14);
		day14.setLayout(null);

		JLabel DLab14 = new JLabel(" 14");
		DLab14.setForeground(new Color(0, 0, 102));
		DLab14.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab14.setBounds(0, 0, 23, 23);
		day14.add(DLab14);

		JPanel day15 = new JPanel();
		day15.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day15);
		day15.setLayout(null);

		JLabel DLab15 = new JLabel(" 15");
		DLab15.setForeground(new Color(0, 0, 102));
		DLab15.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab15.setBounds(0, 0, 23, 23);
		day15.add(DLab15);

		JPanel day16 = new JPanel();
		day16.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day16);
		day16.setLayout(null);

		JLabel DLab16 = new JLabel(" 16");
		DLab16.setForeground(new Color(0, 0, 102));
		DLab16.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab16.setBounds(0, 0, 23, 23);
		day16.add(DLab16);

		JPanel day17 = new JPanel();
		day17.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day17);
		day17.setLayout(null);

		JLabel DLab17 = new JLabel(" 17");
		DLab17.setForeground(new Color(0, 0, 102));
		DLab17.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab17.setBounds(0, 0, 23, 23);
		day17.add(DLab17);

		JPanel day18 = new JPanel();
		day18.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day18);
		day18.setLayout(null);

		JLabel DLab18 = new JLabel(" 18");
		DLab18.setForeground(new Color(0, 0, 102));
		DLab18.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab18.setBounds(0, 0, 23, 23);
		day18.add(DLab18);

		JPanel day19 = new JPanel();
		day19.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day19);
		day19.setLayout(null);

		JLabel DLab19 = new JLabel(" 19");
		DLab19.setForeground(new Color(0, 0, 102));
		DLab19.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab19.setBounds(0, 0, 23, 23);
		day19.add(DLab19);

		JPanel day20 = new JPanel();
		day20.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day20);
		day20.setLayout(null);

		JLabel DLab20 = new JLabel(" 20");
		DLab20.setForeground(new Color(0, 0, 102));
		DLab20.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab20.setBounds(0, 0, 23, 23);
		day20.add(DLab20);

		btnmonkey2 = new JButton("");
		btnmonkey2.setIcon(new ImageIcon("src/source/image/monkey.png"));
		btnmonkey2.setBounds(34, 10, 69, 64);
		day20.add(btnmonkey2);

		JPanel day21 = new JPanel();
		day21.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day21);
		day21.setLayout(null);

		JLabel DLab21 = new JLabel(" 21");
		DLab21.setForeground(new Color(0, 0, 102));
		DLab21.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab21.setBounds(0, 0, 23, 23);
		day21.add(DLab21);

		btnele2 = new JButton("");
		btnele2.setIcon(new ImageIcon("src/source/image/elephant.png"));
		btnele2.setBounds(35, 10, 69, 64);
		day21.add(btnele2);

		JPanel day22 = new JPanel();
		day22.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day22);
		day22.setLayout(null);

		JLabel DLab22 = new JLabel(" 22");
		DLab22.setForeground(new Color(0, 0, 102));
		DLab22.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab22.setBounds(0, 0, 23, 23);
		day22.add(DLab22);

		btnbear2 = new JButton("");
		btnbear2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});
		btnbear2.setIcon(new ImageIcon("src/source/image/bear.png"));
		btnbear2.setBorderPainted(false);
		btnbear2.setBounds(35, 10, 64, 64);
		day22.add(btnbear2);

		JPanel day23 = new JPanel();
		day23.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day23);
		day23.setLayout(null);

		JLabel DLab23 = new JLabel(" 23");
		DLab23.setForeground(new Color(0, 0, 102));
		DLab23.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab23.setBounds(0, 0, 23, 23);
		day23.add(DLab23);

		JPanel day24 = new JPanel();
		day24.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day24);
		day24.setLayout(null);

		JLabel DLab24 = new JLabel(" 24");
		DLab24.setForeground(new Color(0, 0, 102));
		DLab24.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab24.setBounds(0, 0, 23, 23);
		day24.add(DLab24);

		btnlion2 = new JButton("");
		btnlion2.setIcon(new ImageIcon("src/source/image/lion.png"));
		btnlion2.setBorderPainted(false);
		btnlion2.setBounds(35, 10, 64, 64);
		day24.add(btnlion2);

		JPanel day25 = new JPanel();
		day25.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day25);
		day25.setLayout(null);

		JLabel DLab25 = new JLabel(" 25");
		DLab25.setForeground(new Color(0, 0, 102));
		DLab25.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab25.setBounds(0, 0, 23, 23);
		day25.add(DLab25);

		JPanel day26 = new JPanel();
		day26.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day26);
		day26.setLayout(null);

		JLabel DLab26 = new JLabel(" 26");
		DLab26.setForeground(new Color(0, 0, 102));
		DLab26.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab26.setBounds(0, 0, 23, 23);
		day26.add(DLab26);

		btnseal2 = new JButton("");
		btnseal2.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});
		btnseal2.setIcon(new ImageIcon("src/source/image/ball.png"));
		btnseal2.setBounds(35, 10, 64, 64);
		day26.add(btnseal2);

		JPanel day27 = new JPanel();
		day27.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day27);
		day27.setLayout(null);

		JLabel DLab27 = new JLabel(" 27");
		DLab27.setForeground(new Color(0, 0, 102));
		DLab27.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab27.setBounds(0, 0, 23, 23);
		day27.add(DLab27);

		JLabel label_1 = new JLabel("");
		label_1.setBounds(35, 10, 64, 64);
		day27.add(label_1);

		JPanel day28 = new JPanel();
		day28.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day28);
		day28.setLayout(null);

		JLabel DLab28 = new JLabel(" 28");
		DLab28.setForeground(new Color(0, 0, 102));
		DLab28.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab28.setBounds(0, 0, 23, 23);
		day28.add(DLab28);

		JPanel day29 = new JPanel();
		day29.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day29);
		day29.setLayout(null);

		JLabel DLab29 = new JLabel(" 29");
		DLab29.setForeground(new Color(0, 0, 102));
		DLab29.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab29.setBounds(0, 0, 23, 23);
		day29.add(DLab29);

		JPanel day30 = new JPanel();
		day30.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day30);
		day30.setLayout(null);

		JLabel DLab30 = new JLabel(" 30");
		DLab30.setForeground(new Color(0, 0, 102));
		DLab30.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab30.setBounds(0, 0, 23, 23);
		day30.add(DLab30);

		JPanel day31 = new JPanel();
		day31.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day31);
		day31.setLayout(null);

		JLabel DLab31 = new JLabel(" 31");
		DLab31.setForeground(new Color(0, 0, 102));
		DLab31.setFont(new Font("Copperplate Gothic Bold", Font.PLAIN, 12));
		DLab31.setBounds(0, 0, 23, 23);
		day31.add(DLab31);

		JPanel day32 = new JPanel();
		day32.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day32);
		day32.setLayout(null);

		JPanel day33 = new JPanel();
		day33.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day33);
		day33.setLayout(null);

		JPanel day34 = new JPanel();
		day34.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day34);
		day34.setLayout(null);

		JPanel day35 = new JPanel();
		day35.setBorder(new LineBorder(new Color(153, 153, 153)));
		DayPanel.add(day35);
		day35.setLayout(null);

		homebtn = new JButton(new ImageIcon("src/source/image/home.png"));
		homebtn.setBounds(870, 10, 64, 64);
		homebtn.setBorderPainted(false);
		calendarPanel.add(homebtn);

	}

	public abstract void btnAction();
}
